package com.framework.modules.base.service;

import com.baomidou.mybatisplus.service.IService;
import com.framework.common.utils.PageUtils;
import com.framework.modules.base.entity.PostsCommentsEntity;
import com.framework.modules.base.entity.UserDoingEntity;

import java.util.Map;

/**
 * 用户评论
 *
 * @author MIT
 * @email litmiss@gmail.com
 * @date 2020-10-03 16:58:28
 */
public interface PostsCommentsService extends IService<PostsCommentsEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 更新评论喜欢数
     * @param id
     * @param likeCount
     * @param type add=自加1 reduce=自减1 update=更新数
     * @return
     */
    Integer updateCommentLikeCount(Integer id, Integer likeCount,String type);

    /**
     * 新增动态评论
     * @param entity
     * @return
     */
    Object commentItemAdd(PostsCommentsEntity entity);

    /**
     * 喜欢评论
     * @param entity
     * @return
     */
    Object likeComment(UserDoingEntity entity);

}

